package vistas;

//345678901234567890123456789012345678901234567890123456789012345678901234567890

import javax.swing.ImageIcon;
import java.awt.*;

public class RenderAuto implements IRenderizable {
	
	private Canvas lienzo;
	
	private Image imgAuto;
	
	private int x, y;
	
	public RenderAuto(Canvas lienzo) {
		
		this.lienzo = lienzo;
		imgAuto = new ImageIcon(getClass()
			.getResource("auto.gif")).getImage();
		
	}
	
	public void setPosX(int x) {
		
		this.x = x;
		
	}
	
	public void setPosY(int y) {
		
		this.y = y;
		
	}

	public int getPosY() {
		
		return y;
		
	}
	//contrato del la interfaz IRenderizable
	public void render(Graphics dbg) {
		
		
		dbg.drawImage(imgAuto, x, y, lienzo);
		
		
	}
	
}
